package com.etc.service.impl;

import com.etc.dao.RoomDao;
import com.etc.entity.Room;
import com.etc.service.RoomService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class RoomServiceImpl implements RoomService {
    @Resource
    private RoomDao roomDao;
    @Override
    public int update(Room room) {
        return roomDao.update(room);
    }

    @Override
    public int buyRoom(Integer owner_id, Integer id) {
        return roomDao.buyRoom(owner_id,id);
    }

    @Override
    public int sellRoom(Integer id) {
        return roomDao.sellRoom(id);
    }

}
